import Vue from 'vue'
import VueRouter from 'vue-router'

import Index from './index.vue'
import Coupon from './coupon.vue'

const routes = [{ 
    	path: '/', 
	    name:'首页',
	    component: Index,
	    meta: {
	        keepAlive: true, //此组件需要被缓存   
	    }
    },{ 
    	path: '/Coupon', 
    	name:'优惠券', 
    	component: Coupon 
    }
]

Vue.use(VueRouter)

const router = new VueRouter({	
    routes:routes
})

new Vue({
  router: router
}).$mount('#app')
